package org.streets.eis.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity @Table(name="EIS_ROLES")
public class Role  implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id 
	private String id;
	@Column
	private String code;
	@Column
	private String name;
	@Column
	private Integer value;
	@Column
	private String organId;

	public Role() {		
	}
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getValue() {
		return value;
	}
	
	public void setValue(Integer value) {
		this.value = value;
	}	

	public String getOrganId() {
		return organId;
	}

	public void setOrganId(String organId) {
		this.organId = organId;
	}

	@Override
	public int hashCode(){
		return id.hashCode();
	}
	
	@Override
	public boolean equals(Object obj){
		return obj!=null&&(obj instanceof Role)&&id.equals(((Role)obj).id);
	}	
	
}
